# Pseudokod 5 podstawowych zasad

class Environment():

	def __init__(self):
		Inicjalizacja gry
	
	def get_observation(self):
		Zwraca stan gry
	
	def get_reward(self, action):
		Zwraca nagrodę po rozegraniu akcji
	
	def update(self, action):
		Aktualizuje środowisko na podstawie wykonanej akcji
		
class AI():

	def __init__(self):
		Inicjalizacja AI
	
	def train(self, state_of_the_game, reward):
		Trening AI na podstawie stanu gry i otrzymywanych nagród

	def play_action(self, state_of_the_game):
		Rozegranie akcji na podstawie stanu gry

def markov_decision_process_training():
	env = Environment()
	ai = AI() 
	while True:
		state_of_the_game = env.get_observation()
		action = ai.play_action(state_of_the_game)
		reward = env.get_reward(action)
		ai.train(state_of_the_game, reward)
		env.update(action)

def markov_decision_process_inference():
	env = Environment()
	ai = AI() 
	while True:
		state_of_the_game = env.get_observation()
		action = ai.play_action(state_of_the_game)
		env.update(action)
